// const { contextBridge, ipcRenderer } = require("electron");
// const fs = require('fs')
// const path = require('path')

import { contextBridge, ipcRenderer } from "electron";

contextBridge.exposeInMainWorld("electronAPI",{
    setFullScreen:(bool)=>{
        ipcRenderer.send("set_full_screen",bool);
    },
    openFile: async () => {
         return await ipcRenderer.invoke('dialog:openFile');
    },
    saveJson: async (info)=>{
        return await ipcRenderer.invoke('dialog:saveJson',info);
    },

    getConfig: async ()=>{
        return await ipcRenderer.invoke('dialog:getConfig');
    },
});